package com.xxxt.hrs.controller;



import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.xxxt.dao.TeacherMapper;
import com.xxxt.entity.Teacher;
import com.xxxt.hrs.service.TeacherService;
import com.xxxt.utils.CheckcodeUtil;
import com.xxxt.utils.MD5Util;
import com.xxxt.utils.MailUtil;
import com.xxxt.utils.PropertyCheckUtil;

@Controller
@RequestMapping("/teacher")
public class TeacherController {
@Autowired
private TeacherService teacherService;
@Autowired
private TeacherMapper teacherMapper;
	
/**
 * @describe 教师注册账号
 * @param tno 教师输入工号
 * @param classGradeId 教师选择班级id 
 * @param password  教师注册输入注册密码
 * @param againPassword 教师再次输入注册密码
 * @param phone 教师手机号
 * @param email 教师邮箱
 * @return
 * @throws Exception 
 */
@RequestMapping(value="/teacherRegister" ,method = RequestMethod.GET)  
@ResponseBody
public JSONObject teacherRegister(HttpSession session,String tno,String name,String password ,String againPassword,String email,String checkCode) throws Exception {
	JSONObject json=new JSONObject();
	//判断字段合法性
	if(tno==null||"".equals(tno)||
	name==null||"".equals(name)||password==null||"".equals(password)||againPassword==null
	||"".equals(againPassword)||email==null||"".equals(email)||checkCode==null||"".equals(checkCode)) {
		json.put("status", 1);
		json.put("message", "传入数据不合法!");
		return json;
	}
	//校验名字正确性
	boolean checkname = MailUtil.checkname(name);
	if(checkname==false) {
		json.put("status", 9);
		json.put("message", "名字格式不合法!");
		return json;
	}
	boolean checkemail = MailUtil.checkemail(email);
	if(checkemail==false) {
		json.put("status", 10);
		json.put("message", "邮箱格式不合法!");
		return json;
	}
	String md5withkey = MD5Util.md5withkey(password, "xxxt");
	String registerStatus="waiting";
	//判断密码一致性
	if(!password.equals(againPassword)) {
			json.put("status", 2);
			json.put("message", "两次输入密码不一致!");
			return json;
	}
	//查询验证码
	String sessionCheckCode = (String) session.getAttribute("checkCode");
	if(!checkCode.equals(sessionCheckCode)) {
			json.put("status", 6);
			json.put("message", "验证码不正确，请重新输入!");
			return json;
	}
//	//查询班级是否存在
//	ClassGrade selectClassGradeByClassGradeId = classGradeMapper.selectClassGradeByClassGradeId(classGradeId);
//	if(selectClassGradeByClassGradeId==null) {
//		json.put("status", 7);
//		json.put("message", "选择的班级不存在!");
//		return json;
//	}
	//查询班级是否有老师了
//	ClassGrade selectOneClassGradeByClassGradeId = classGradeMapper.selectOneClassGradeByClassGradeId(classGradeId);
//	if(selectOneClassGradeByClassGradeId!=null) {
//		//join以后查询，这个班级没有教师，首先缔造关联
//		json.put("status", 8);
//		json.put("message", "该班级已有教师进行管理，请选择其他班级!");
//		return json;
//	}
	//查询老师，查重
	Teacher queryOneTeacherByTno;
try {
		queryOneTeacherByTno = teacherMapper.queryOneTeacherByTno(tno);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	//如果没有存在记录说明第一次来注册：直接进入认领流程
	//存在记录说明可能被拒绝或者等待中或者已同意的过来注册
	//这里是已存在的：
	if(queryOneTeacherByTno!=null) {
			if("agree".equals(queryOneTeacherByTno.getRegisterStatus())) {
					json.put("status", 3);
					json.put("message", "教师账号注册失败，该老师已经存在!");
					return json;
				}
			//注册时初始化状态waiting
			if("waiting".equals(queryOneTeacherByTno.getRegisterStatus())) {
					json.put("status", 4);
					json.put("message", "该账号已经提交过注册申请，请等待管理员审核!");
					return json;
				}
			if("refuse".equals(queryOneTeacherByTno.getRegisterStatus())) {
					Teacher teacher =new Teacher(tno,name,md5withkey,email,registerStatus);
				try {
						//更新老师状态字段
						teacherMapper.updateTeacher(teacher);
						//对班级表无人认领的老师进行认领
						//查出需要改哪个班级实体类
//						ClassGrade queryOneClassGradeByClassGradeId = classGradeMapper
//								.queryOneClassGradeByClassGradeId(classGradeId);
				} catch (Exception e) {
						e.printStackTrace();
						json.put("status", -1);
						json.put("message", "服务器内部错误");
						return json;
				}
						json.put("status", 0);
						json.put("message", "再次注册成功，请等待管理员审核!");
						return json;
				}
			//构造教师实体类(除了classGradeId以外，添加对应记录)
			Teacher teacher =new Teacher(tno,name,md5withkey,email,registerStatus);
			//进行添加
		try {
			teacherMapper.addOneTeacher(teacher);
			//对班级表无人认领的老师进行认领
			//构造一个班级实体类
//			ClassGrade classGrade=new ClassGrade(classGradeId);
//			classGradeMapper.updateClassGrade(classGrade);
		} catch (Exception e) {
				e.printStackTrace();
				json.put("status", -1);
				json.put("message", "服务器内部错误");
				return json;
		}
				json.put("status", 0);
				json.put("message", "申请注册成功，请等待管理员审核!");
				return json;
		}
	//到这里是没有记录的
	else {
			//构造教师实体类(除了classGradeId以外，添加对应记录)
			Teacher teacher =new Teacher(tno,name,md5withkey,email,registerStatus);
		try {
				//进行添加
				teacherMapper.addOneTeacher(teacher);
				//对班级表无人认领的老师进行认领
				//构造一个班级实体类
//				ClassGrade classGrade=new ClassGrade(classGradeId);
//				classGradeMapper.updateClassGrade(classGrade);
		} catch (Exception e) {
				e.printStackTrace();
				json.put("status", -1);
				json.put("message", "服务器内部错误");
				return json;
		}
				json.put("status", 0);
				json.put("message", "申请注册成功，请等待管理员审核!");
				return json;
		}
}
/**
 * 
 * @describe 教师修改个人信息
 * @param tno 教师工号
 * @param name 教师姓名
 * @param phone 教师手机号
 * @param email 教师邮箱
 * @return
 */
@RequestMapping(value="/modifyTeacherInfo" ,method = RequestMethod.GET)  
@ResponseBody
public JSONObject modifyTeacherInfo(String tno,String sex,String name,String phone,String email,String idcard) {
	JSONObject json=new JSONObject();
	//数据校验
	if(tno==null||"".equals(tno)||name==null||"".equals(name)||phone==null||
	"".equals(phone)||email==null||"".equals(email)) {
		json.put("status", 1);
		json.put("message","传入数据不合法!");
		return json;
	}
		//校验格式：
	//校验手机号
	boolean checkphone = MailUtil.checkphone(phone);
	if(checkphone==false) {
		json.put("status", 5);
		json.put("message","手机号格式不正确!");
		return json;
	}
	//校验身份证号
	boolean idCard2 = PropertyCheckUtil.isIdCard(idcard);
	if(idCard2==false) {
		json.put("status", 6);
		json.put("message","身份证格式不正确!");
		return json;
	}
	//校验姓名
	boolean name2 = PropertyCheckUtil.isName(name);
	if(name2==false) {
		json.put("status", 7);
		json.put("message","姓名格式不正确!");
		return json;
	}
	//校验邮箱
	boolean checkemail = MailUtil.checkemail(email);
	if(checkemail==false) {
		json.put("status", 8);
		json.put("message","邮箱格式不正确!");
		return json;
	}
	//教师注册状态校验，只有agree状态的才能进行状态修改
	Teacher queryOneTeacherByTno;
	try {
		queryOneTeacherByTno = teacherMapper.queryOneTeacherByTno(tno);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	if(queryOneTeacherByTno==null) {
		json.put("status", 2);
		json.put("message","操作失败，该教师不存在!");
		return json;
	}
	//被拒绝了
	if("refuse".equals(queryOneTeacherByTno.getRegisterStatus())) {
		json.put("status", 3);
		json.put("message","该账号申请已经被管理员拒绝了，请重新进行申请后再次操作!");
		return json;
	}
	//在等待状态
	if("waiting".equals(queryOneTeacherByTno.getRegisterStatus())) {
		json.put("status", 4);
		json.put("message","该账号申请正在审核中，管理员通过后方可进行操作!");
		return json;
	}
	//构造教师实体
	Teacher teacher=new Teacher();
		teacher.setTno(tno);
		teacher.setSex(sex);
		teacher.setName(name);
		teacher.setEmail(email);
		teacher.setPhone(phone);
		teacher.setIdcard(idcard);
	try {
		//进到这里说说明是agree状态允许修改
		teacherMapper.updateTeacher(teacher);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
		json.put("status", 0);
		json.put("message","操作成功!");
		return json;
	
}
/**
 * @describe 根据教师工号查询教师所管理的班级、班级所在年级专业学院学校
 * @param tno
 * @return
 */
@RequestMapping(value="/queryOneTeacherClassGradeInfoByTno" ,method = RequestMethod.GET)  
@ResponseBody
public JSONObject queryOneTeacherClassGradeInfoByTno(String tno) {
	JSONObject json=new JSONObject();
	//校验数据合法性
	if(tno==null||"".equals(tno)) {
		json.put("status", 1);
		json.put("message","传入数据不合法!");
		return json;
	}
	Teacher queryOneTeacherByTno;
	try {
		queryOneTeacherByTno = teacherMapper.queryOneTeacherByTno(tno);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	if(queryOneTeacherByTno==null) {
		json.put("status", 2);
		json.put("message","该教师不存在!");
		return json;
	}
	if("refuse".equals(queryOneTeacherByTno.getRegisterStatus())) {
		json.put("status", 3);
		json.put("message","该账号注册申请已被拒绝，请进行注册申请后再次进行操作!");
		return json;
	}
	if("waiting".equals(queryOneTeacherByTno.getRegisterStatus())) {
		json.put("status", 4);
		json.put("message","该账号申请正在审核中，管理员通过后方可进行操作!");
		return json;
	}
	Teacher queryOneTeacherInfoByTno;
	try {
		queryOneTeacherInfoByTno = teacherMapper.queryOneTeacherInfoByTno(tno);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	if(queryOneTeacherInfoByTno.getClassGrades()==null) {
		json.put("status", 5);
		json.put("message","该教师未管理任何班级!");
		return json;
	}
	json.put("status", 0);
	json.put("message","操作成功!");
	json.put("teacher",queryOneTeacherInfoByTno);
	return json;
}
/**
 *  @describe 根据教师工号删除单个教师
 * @param tno 教师工号
 * @return
 */
@RequestMapping(value="/deleteOneTeacher" ,method = RequestMethod.GET)  
@ResponseBody
public JSONObject deleteOneTeacher(String tno) {
	JSONObject json=new JSONObject();
	//数据校验
	if(tno==null||"".equals(tno)) {
		json.put("status", 1);
		json.put("message","传入数据不合法!");
		return json;
	}
	Teacher queryOneTeacherByTno;
	try {
		queryOneTeacherByTno = teacherMapper.queryOneTeacherByTno(tno);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	if(queryOneTeacherByTno==null) {
		json.put("status", 2);
		json.put("message","该教师不存在!");
		return json;
	}
	try {
		//删除之前先把与这个老师关联的学生tno字段全部设置为null
		teacherService.cancelRelationshipByTno(tno);
		//进行删除
		teacherMapper.deleteOneTeacherByTno(tno);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
		json.put("status", 0);
		json.put("message","操作成功!");
		return json;
	}
/**
 * @describe 根据工号字符串数组批量删除教师
 * @param tnoArray 教师工号字符串数组
 * @return
 */
@RequestMapping(value="/batchDeleteTeacherByTno" ,method = RequestMethod.POST)  
@ResponseBody
public JSONObject batchDeleteTeacherByTno(@RequestParam("tnoArray[]") List<String> tnoArray) {
	JSONObject json=new JSONObject();
	if(tnoArray==null||tnoArray.size()==0) {
		json.put("status", 1);
		json.put("message", "传入数据不合法！");
		return json;
	}
	try {
		//删除所有教师
		for (String string : tnoArray) {
			//解决关联关系,与学生取消关系
			teacherService.cancelRelationshipByTno(string);
		} 
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	try {
		//批量进行删除
		teacherMapper.batchDeleteTeacherByTno(tnoArray);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
		json.put("status", 0);
		json.put("message", "操作成功！");
		return json;
}
/**
 * @describe 根据教师工号查询教师基本信息(电话邮箱姓名性别等等)
 * @param tno 传入的教师工号
 * @return 
 */
@RequestMapping(value="/queryOneTeacherInfoByTno" ,method = RequestMethod.GET)  
@ResponseBody
public JSONObject queryOneTeacherInfoByTno(String tno) {
	JSONObject json=new JSONObject();
	//参数校验
	if(tno==null||"".equals(tno)) {
		json.put("status", 1);
		json.put("message", "传入数据不合法！");
		return json;
	}
	//判断教师是否存在
	Teacher queryOneTeacherByTno;
	try {
		queryOneTeacherByTno = teacherMapper.queryOneTeacherByTno(tno);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	if(queryOneTeacherByTno==null) {
		json.put("status", 2);
		json.put("message", "该教师不存在！");
		return json;
	}
//	//存在判断状态字段（refuse与waiting状态不能查询）
//	if("refuse".equals(queryOneTeacherByTno.getRegisterStatus())) {
//		json.put("status", 3);
//		json.put("message","该账号注册申请已被拒绝，请进行注册申请后再次进行操作!");
//		return json;
//	}
//	if("waiting".equals(queryOneTeacherByTno.getRegisterStatus())) {
//		json.put("status", 4);
//		json.put("message","该账号申请正在审核中，管理员通过后方可进行操作!");
//		return json;
//	}
	//抹去密码信息
	queryOneTeacherByTno.setPassword(null);
		json.put("status", 0);
		json.put("message","操作成功！");
		json.put("teacher",queryOneTeacherByTno);
		return json;
}
/**
 * @describe 根据姓名模糊查询一个教师的基本信息
 * @param name 传入的查询姓名
 * @return
 */
@RequestMapping(value="/queryOneTeacherInfoByNameLike" ,method = RequestMethod.GET)  
@ResponseBody
public JSONObject queryOneTeacherInfoByNameLike(String name) {
	JSONObject json=new JSONObject();
	//校验数据
	if(name==null||"".equals(name)) {
		json.put("status", 1);
		json.put("message", "传入数据不合法！");
		return json;
	}
	//进行查询
	List<Teacher> queryOneTeacherInfoByNameLike;
	try {
		queryOneTeacherInfoByNameLike = teacherMapper.queryOneTeacherInfoByNameLike(name);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	if(queryOneTeacherInfoByNameLike.size()<=0) {
		json.put("status", 2);
		json.put("message", "暂无查询结果！");
		return json;
	}
		json.put("status", 0);
		json.put("message","操作成功！");
		json.put("teacherList",queryOneTeacherInfoByNameLike);
		return json;
}
/**
 * @describe 同意或者拒绝单个教师注册申请
 * @param tno 教师工号
 * @param flag 操作标志，1拒绝，2同意
 * @return
 */
@RequestMapping(value="/allowOrRefuseOneTeacherRegister" ,method = RequestMethod.GET)  
@ResponseBody
public JSONObject allowOrRefuseOneTeacherRegister(String tno,int flag) {
	JSONObject json=new JSONObject();
	//数据校验
	if(tno==null||"".equals(tno)) {
		json.put("status", 1);
		json.put("message", "传入参数不合法！");
		return json;
	}
	//查看教师是否存在
	Teacher queryOneTeacherByTno;
	try {
		queryOneTeacherByTno = teacherMapper.queryOneTeacherByTno(tno);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	if(queryOneTeacherByTno==null) {
		json.put("status", 2);
		json.put("message", "该教师不存在！");
		return json;
	}
	//判断账号教师状态
	String registerStatus = queryOneTeacherByTno.getRegisterStatus();
	if("agree".equals(registerStatus)||"refuse".equals(registerStatus)) {
		json.put("status", 3);
		json.put("message", "该教师账号已经进行过审批！");
		return json;
	}
	//2进行同意：waiting 
	if(flag==2) {
				queryOneTeacherByTno.setRegisterStatus("agree");
				try {
					teacherMapper.updateTeacher(queryOneTeacherByTno);
				} catch (Exception e) {
					e.printStackTrace();
					json.put("status", -1);
					json.put("message", "服务器内部错误");
					return json;
				}
				json.put("status", 0);
				json.put("message", "成功同意该教师的申请！");
				return json;
		}
	else {//进行拒绝
				queryOneTeacherByTno.setRegisterStatus("refuse");
				try {
					teacherMapper.updateTeacher(queryOneTeacherByTno);
				} catch (Exception e) {
					e.printStackTrace();
					json.put("status", -1);
					json.put("message", "服务器内部错误");
					return json;
				}
				json.put("status", 0);
				json.put("message", "成功拒绝该教师的申请！");
				return json;
	}
	
}
/**
 * @describe 批量同意或者批量拒绝一批教师申请
 * @param tnoArray 教师工号数组
 * @param flag 操作标志，1拒绝，2同意
 * @return
 */
@RequestMapping(value="/allowOrRefuseManyTeachersRegister" ,method = RequestMethod.POST)  
@ResponseBody
public JSONObject allowOrRefuseManyTeachersRegister(@RequestParam("tnoArray[]") List<String> tnoArray,int flag) {
	JSONObject json=new JSONObject();
	//数据校验
	if(tnoArray==null||tnoArray.size()==0) {
		json.put("status", 1);
		json.put("message", "传入参数不合法！");
		return json;
	}
	try {
		//对不存在的教师进行判断
		for (String string : tnoArray) {
			Teacher queryOneTeacherByTno;
			queryOneTeacherByTno = teacherMapper.queryOneTeacherByTno(string);
			if (queryOneTeacherByTno == null) {
				json.put("status", 2);
				json.put("message", "传入参数中有不存在的教师！");
				return json;
			}
		}
		//对教师状态进行判断
		for (String string : tnoArray) {
			Teacher queryOneTeacherByTno = teacherMapper.queryOneTeacherByTno(string);
			if ("agree".equals(queryOneTeacherByTno.getRegisterStatus())
					|| "refuse".equals(queryOneTeacherByTno.getRegisterStatus())) {
				json.put("status", 3);
				json.put("message", "传入参数中有已经申请过注册或被拒绝注册的教师！");
				return json;
			}
		} 
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	//批量更新(同意)
	if(flag==2) {
	List<Teacher> teacherList=new ArrayList<>();
		try {
			for (String string : tnoArray) {
				Teacher queryOneTeacherByTno = teacherMapper.queryOneTeacherByTno(string);
				teacherList.add(queryOneTeacherByTno);
			}
			for (Teacher teacher : teacherList) {
				teacher.setRegisterStatus("agree");
				teacherMapper.updateTeacher(teacher);
			} 
		} catch (Exception e) {
			e.printStackTrace();
			json.put("status", -1);
			json.put("message", "服务器内部错误");
			return json;
		}
			json.put("status", 0);
			json.put("message", "批量同意申请成功！");
			return json;
		}
	else {
		try {
			List<Teacher> teacherList = new ArrayList<>();
			for (String string : tnoArray) {
				Teacher queryOneTeacherByTno = teacherMapper.queryOneTeacherByTno(string);
				teacherList.add(queryOneTeacherByTno);
			}
			for (Teacher teacher : teacherList) {
				teacher.setRegisterStatus("refuse");
				teacherMapper.updateTeacher(teacher);
			}
			json.put("status", 0);
			json.put("message", "批量拒绝申请成功！");
			return json;
		} catch (Exception e) {
			e.printStackTrace();
			json.put("status", -1);
			json.put("message", "服务器内部错误");
			return json;
		}	
	}
}
/**
 * 查看所有待审核的教师列表然后分页显示
 * @return
 */
@RequestMapping(value="/queryWaitingRegisterTeachers" ,method = RequestMethod.GET)  
@ResponseBody
public JSONObject queryWaitingRegisterTeachers(int pageNum,int pageSize) {
	JSONObject json=new JSONObject();
	PageInfo<Teacher> queryWaitingRegisterTeachersWithPage;
	try {
		queryWaitingRegisterTeachersWithPage = teacherService.queryWaitingRegisterTeachersWithPage(pageNum, pageSize);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	if(queryWaitingRegisterTeachersWithPage.getSize()<=0) {
		json.put("status", 1);
		json.put("message", "暂无人申请注册！");
		return json;
	}
	json.put("teacherList",queryWaitingRegisterTeachersWithPage);
	json.put("status", 0);
	json.put("message", "操作成功！");
	return json;
}
@RequestMapping(value="/sendEmail" ,method = RequestMethod.GET)  
@ResponseBody
public JSONObject sendEmail(String email,HttpSession session){
	JSONObject json=new JSONObject();
	//数据校验
	if(email==null||"".equals(email)) {
		json.put("status", 1);
		json.put("message", "传入参数不合法！");
		return json;
	}
	//查询是否有人使用
	Teacher queryOneTeacherByEmail;
	try {
		queryOneTeacherByEmail = teacherMapper.queryOneTeacherByEmail(email);
	} catch (Exception e) {
		e.printStackTrace();
		json.put("status", -1);
		json.put("message", "服务器内部错误");
		return json;
	}
	if(queryOneTeacherByEmail!=null) {
		json.put("status", 2);
		json.put("message", "该邮箱已经有人使用！");
		return json;
	}
	//校验邮箱格式
	boolean checkemail = MailUtil.checkemail(email);
	if(checkemail==false) {
		json.put("status", 3);
		json.put("message", "您输入的邮箱格式不正确，请输入正确的邮箱格式！");
		return json;
	}
	//产生随机码
	String checkCode = CheckcodeUtil.getCheckCode();
	//将其放入session
	session.setAttribute("checkCode", checkCode);
	//发送邮件
	MailUtil.send(email,"[实习系统]实习系统验证邮件","[实习系统]尊敬的教师您好:感谢您使用实习系统，您的验证码是:"+checkCode+"。" );
	json.put("status", 0);
	json.put("message", "验证码发送成功，请至邮箱进行查收！");
	return json;
	}
}
